package com.huitu.whht.base.core.api.wr.pdo;

import com.huitu.api.rest.AbstractApiResource;
import com.huitu.commons.PageUtils;
import com.huitu.whht.api.core.common.response.ApiResultBuilder;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiResource;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiService;
import com.huitu.whht.api.core.common.response.StatusRespBuilder;

import com.huitu.whht.base.core.api.wr.pdo.entities.WrPdoB;

import com.huitu.whht.base.core.api.wr.pdo.entities.WrPdoBQo;
import com.huitu.whht.base.core.api.wr.pdo.service.IWrPdoBService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

/**
 * 说明: 入河排污口基本信息表API,表名称: WR_PDO_B <br/>
 * 日期: 2019-04-15
 * @author LiuCW
 */
@Component
@SzyCoreApiResource
@Path("wr/pdo/b")
public class WrPdoBResource extends AbstractApiResource {

    private static final Logger LOGGER = LoggerFactory.getLogger(WrPdoBResource.class);

    private static final String UUID = "47d20c4f-4cb3-46b0-bd59-31497a8a4b7c";

    @Override
    public String getUUID() {
        return UUID;
    }

    @Autowired
    @SzyCoreApiService
    IWrPdoBService wrPdoBService;

    /**
     * @api {get} wr/pdo/b/{pdoCd:\\w{12}} [R][G]根据主键查询
     * @apiDescription [G]根据主键查询WR_PDO_B(入河排污口基本信息表)数据
     * @apiName (generate)select by primary key
     * @apiGroup WR_PDO_B-入河排污口基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest wr/pdo/b/420581000023
     * @apiParam   {String}         pdoCd              【必须】入河排污口代码
     * @apiSuccess {String}         pdoCd              入河排污口代码
     * @apiSuccess {String}         pdoNm              入河排污口名称
     * @apiSuccess {String}         addr               地址
     * @apiSuccess {String}         pdoTp              入河排污口性质
     * @apiSuccess {Date}           compDt             建成日期(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {String}         emisTp             排放方式
     * @apiSuccess {String}         inRvTp             入河方式
     * @apiSuccess {Double}         desPollCap         设计日排污能力
     * @apiSuccess {String}         runCond            运行状况
     * @apiSuccess {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {String}         nt                 备注
     * @apiSuccess {String}         powTp              污水分类
     * @apiSuccess {String}         emisCyc            间歇或季节性排放周期
     * @apiSuccess {Integer}        cycDnum            周期内排放次数
     * @apiSuccess {String}         pdoSca             入河排污口规模
     * @apiSuccess {String}         perStu             许可状态
     * @apiSuccess {String}         morChe             监督性监测状态
     * @apiSuccess {Integer}        pdoSize            排污口截面积
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "pdoCd": "420581000023",
     * "pdoNm": "红花套镇青年闸排污口",
     * "addr": null,
     * "pdoTp": null,
     * "compDt": null,
     * "emisTp": "2",
     * "inRvTp": "4",
     * "desPollCap": null,
     * "runCond": null,
     * "ts": "2014-07-26 18:41:18.0",
     * "nt": null,
     * "powTp": null,
     * "emisCyc": null,
     * "cycDnum": null,
     * "pdoSca": null,
     * "perStu": null,
     * "morChe": null,
     * "pdoSize": null
     *  }
     * }
     * @apiUse exceptions
     */
    @GET
    @Path("{pdoCd:\\w{12}}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectByPrimaryKey(@PathParam("pdoCd") String pdoCd) {
        LOGGER.info("根据主键查询 入河排污口基本信息表,参数 pdoCd:{}", pdoCd);
        return Response.ok(ApiResultBuilder.create(this, wrPdoBService.selectByPrimaryKey(pdoCd))).build();
    }

    /**
     * @api {post} wr/pdo/b/list [R][G]根据条件查询
     * @apiDescription [G]根据条件查询WR_PDO_B(入河排污口基本信息表)数据
     * @apiName (generate)select by filter
     * @apiGroup WR_PDO_B-入河排污口基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest wr/pdo/b/list
     * @apiParam   {List(String)}   pdoCdList          (数组)入河排污口代码
     * @apiParam   {String}         pdoCd              入河排污口代码
     * @apiParam   {String}         pdoNm              入河排污口名称
     * @apiParam   {String}         addr               地址
     * @apiParam   {List(String)}   pdoTpList          (数组)入河排污口性质
     * @apiParam   {Date}           compDtBgTm         (开始时间)建成日期
     * @apiParam   {Date}           compDtEdTm         (结束时间)建成日期
     * @apiParam   {List(String)}   emisTpList         (数组)排放方式
     * @apiParam   {List(String)}   inRvTpList         (数组)入河方式
     * @apiParam   {Double}         desPollCapMin      (最小)设计日排污能力
     * @apiParam   {Double}         desPollCapMax      (最大)设计日排污能力
     * @apiParam   {List(String)}   runCondList        (数组)运行状况
     * @apiParam   {Date}           tsBgTm             (开始时间)时间戳
     * @apiParam   {Date}           tsEdTm             (结束时间)时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {List(String)}   powTpList          (数组)污水分类
     * @apiParam   {List(String)}   emisCycList        (数组)间歇或季节性排放周期
     * @apiParam   {List(Integer)}  cycDnumList        (数组)周期内排放次数
     * @apiParam   {List(String)}   pdoScaList         (数组)入河排污口规模
     * @apiParam   {List(String)}   perStuList         (数组)许可状态
     * @apiParam   {List(String)}   morCheList         (数组)监督性监测状态
     * @apiParam   {Integer}        pdoSizeMin         (最小)排污口截面积
     * @apiParam   {Integer}        pdoSizeMax         (最大)排污口截面积
     * @apiSuccess {String}         pdoCd              入河排污口代码
     * @apiSuccess {String}         pdoNm              入河排污口名称
     * @apiSuccess {String}         addr               地址
     * @apiSuccess {String}         pdoTp              入河排污口性质
     * @apiSuccess {Date}           compDt             建成日期
     * @apiSuccess {String}         emisTp             排放方式
     * @apiSuccess {String}         inRvTp             入河方式
     * @apiSuccess {Double}         desPollCap         设计日排污能力
     * @apiSuccess {String}         runCond            运行状况
     * @apiSuccess {Date}           ts                 时间戳
     * @apiSuccess {String}         nt                 备注
     * @apiSuccess {String}         powTp              污水分类
     * @apiSuccess {String}         emisCyc            间歇或季节性排放周期
     * @apiSuccess {Integer}        cycDnum            周期内排放次数
     * @apiSuccess {String}         pdoSca             入河排污口规模
     * @apiSuccess {String}         perStu             许可状态
     * @apiSuccess {String}         morChe             监督性监测状态
     * @apiSuccess {Integer}        pdoSize            排污口截面积
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "pdoCd": "420581000023",
     * "pdoNm": "红花套镇青年闸排污口",
     * "addr": null,
     * "pdoTp": null,
     * "compDt": null,
     * "emisTp": "2",
     * "inRvTp": "4",
     * "desPollCap": null,
     * "runCond": null,
     * "ts": "2014-07-26 18:41:18.0",
     * "nt": null,
     * "powTp": null,
     * "emisCyc": null,
     * "cycDnum": null,
     * "pdoSca": null,
     * "perStu": null,
     * "morChe": null,
     * "pdoSize": null
     *  }]
     * }
     *
     * @apiSuccessExample 分页请求:
     * request header: Rang={max=50;size=50;field=TS DESC}
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "pdoCd": "420581000023",
     * "pdoNm": "红花套镇青年闸排污口",
     * "addr": null,
     * "pdoTp": null,
     * "compDt": null,
     * "emisTp": "2",
     * "inRvTp": "4",
     * "desPollCap": null,
     * "runCond": null,
     * "ts": "2014-07-26 18:41:18.0",
     * "nt": null,
     * "powTp": null,
     * "emisCyc": null,
     * "cycDnum": null,
     * "pdoSca": null,
     * "perStu": null,
     * "morChe": null,
     * "pdoSize": null
     *  }],
     * "paging": {
     * "count": 3,
     * "total": 120,
     * "finale": false,
     * "index": 1
     * }
     * }
     * @apiUse header_rang
     * @apiUse exceptions
     */
    @POST
    @Path("list")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectList(WrPdoBQo filter) {
        PageUtils.startPageFromRang();
        LOGGER.info("根据条件查询 入河排污口基本信息表,参数 WrPdoBQo:{}", filter);
        return Response.ok(ApiResultBuilder.create(this, wrPdoBService.selectList(filter))).build();
    }

    /**
     * @api {put} wr/pdo/b [C][G]新增数据
     * @apiPrivate
     * @apiDescription [G]新增WR_PDO_B(入河排污口基本信息表)数据
     * @apiName (generate)add data
     * @apiGroup WR_PDO_B-入河排污口基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         pdoCd              【必须】入河排污口代码
     * @apiParam   {String}         pdoNm              【必须】入河排污口名称
     * @apiParam   {String}         addr               地址
     * @apiParam   {String}         pdoTp              入河排污口性质
     * @apiParam   {Date}           compDt             建成日期(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         emisTp             排放方式
     * @apiParam   {String}         inRvTp             入河方式
     * @apiParam   {Double}         desPollCap         设计日排污能力
     * @apiParam   {String}         runCond            运行状况
     * @apiParam   {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         powTp              污水分类
     * @apiParam   {String}         emisCyc            间歇或季节性排放周期
     * @apiParam   {Integer}        cycDnum            周期内排放次数
     * @apiParam   {String}         pdoSca             入河排污口规模
     * @apiParam   {String}         perStu             许可状态
     * @apiParam   {String}         morChe             监督性监测状态
     * @apiParam   {Integer}        pdoSize            排污口截面积
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest wr/pdo/b
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "pdoCd": "420581000023"
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "pdoCd": "420581000023"
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "pdoCd": "420581000023",
     * "pdoNm": "红花套镇青年闸排污口",
     * "addr": null,
     * "pdoTp": null,
     * "compDt": null,
     * "emisTp": "2",
     * "inRvTp": "4",
     * "desPollCap": null,
     * "runCond": null,
     * "ts": "2014-07-26 18:41:18.0",
     * "nt": null,
     * "powTp": null,
     * "emisCyc": null,
     * "cycDnum": null,
     * "pdoSca": null,
     * "perStu": null,
     * "morChe": null,
     * "pdoSize": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insert(WrPdoB record) {
        LOGGER.info("新增 入河排污口基本信息表,参数 WrPdoB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(wrPdoBService.insertSelective(record),record))).build();
    }

    /**
     * @api {post} wr/pdo/b/insertBatch [C][G]批量新增数据
     * @apiPrivate
     * @apiDescription [G]批量新增WR_PDO_B(入河排污口基本信息表)数据
     * @apiName (generate)addBatch data
     * @apiGroup WR_PDO_B-入河排污口基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         pdoCd              【必须】入河排污口代码
     * @apiParam   {String}         pdoNm              【必须】入河排污口名称
     * @apiParam   {String}         addr               地址
     * @apiParam   {String}         pdoTp              入河排污口性质
     * @apiParam   {Date}           compDt             建成日期(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         emisTp             排放方式
     * @apiParam   {String}         inRvTp             入河方式
     * @apiParam   {Double}         desPollCap         设计日排污能力
     * @apiParam   {String}         runCond            运行状况
     * @apiParam   {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         powTp              污水分类
     * @apiParam   {String}         emisCyc            间歇或季节性排放周期
     * @apiParam   {Integer}        cycDnum            周期内排放次数
     * @apiParam   {String}         pdoSca             入河排污口规模
     * @apiParam   {String}         perStu             许可状态
     * @apiParam   {String}         morChe             监督性监测状态
     * @apiParam   {Integer}        pdoSize            排污口截面积
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest wr/pdo/b/insertBatch
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "pdoCd": "420581000023"
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "pdoCd": "420581000023"
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "pdoCd": "420581000023",
     * "pdoNm": "红花套镇青年闸排污口",
     * "addr": null,
     * "pdoTp": null,
     * "compDt": null,
     * "emisTp": "2",
     * "inRvTp": "4",
     * "desPollCap": null,
     * "runCond": null,
     * "ts": "2014-07-26 18:41:18.0",
     * "nt": null,
     * "powTp": null,
     * "emisCyc": null,
     * "cycDnum": null,
     * "pdoSca": null,
     * "perStu": null,
     * "morChe": null,
     * "pdoSize": null
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("insertBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insertBatch(List<WrPdoB> recordList) {
        LOGGER.info("批量新增 入河排污口基本信息表,参数 WrPdoB:[]", recordList);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(wrPdoBService.insertBatch(recordList),recordList))).build();
    }

    /**
     * @api {put} wr/pdo/b/{pdoCd:\\w{12}}/update [U][G]根据主键修改
     * @apiPrivate
     * @apiDescription [G]根据主键修改WR_PDO_B(入河排污口基本信息表)数据
     * @apiName (generate)update data
     * @apiGroup WR_PDO_B-入河排污口基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         pdoCd              【必须】入河排污口代码
     * @apiParam   {String}         pdoNm              【必须】入河排污口名称
     * @apiParam   {String}         addr               地址
     * @apiParam   {String}         pdoTp              入河排污口性质
     * @apiParam   {Date}           compDt             建成日期
     * @apiParam   {String}         emisTp             排放方式
     * @apiParam   {String}         inRvTp             入河方式
     * @apiParam   {Double}         desPollCap         设计日排污能力
     * @apiParam   {String}         runCond            运行状况
     * @apiParam   {Date}           ts                 【必须】时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         powTp              污水分类
     * @apiParam   {String}         emisCyc            间歇或季节性排放周期
     * @apiParam   {Integer}        cycDnum            周期内排放次数
     * @apiParam   {String}         pdoSca             入河排污口规模
     * @apiParam   {String}         perStu             许可状态
     * @apiParam   {String}         morChe             监督性监测状态
     * @apiParam   {Integer}        pdoSize            排污口截面积
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest wr/pdo/b/420581000023/update
     * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "pdoCd": "420581000023",
     * "pdoNm": "红花套镇青年闸排污口",
     * "addr": null,
     * "pdoTp": null,
     * "compDt": null,
     * "emisTp": "2",
     * "inRvTp": "4",
     * "desPollCap": null,
     * "runCond": null,
     * "ts": "2014-07-26 18:41:18.0",
     * "nt": null,
     * "powTp": null,
     * "emisCyc": null,
     * "cycDnum": null,
     * "pdoSca": null,
     * "perStu": null,
     * "morChe": null,
     * "pdoSize": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{pdoCd:\\w{12}}/update")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response update(@PathParam("pdoCd") String pdoCd, WrPdoB record) {
        record.setPdoCd(pdoCd);
        LOGGER.info("根据主键修改 入河排污口基本信息表,参数 WrPdoB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wrPdoBService.updateByPrimaryKey(record)))).build();
    }

    /**
     * @api {put} wr/pdo/b/{pdoCd:\\w{12}}/update-selective [U][G]根据主键修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据主键修改WR_PDO_B(入河排污口基本信息表)数据,只修改非null字段
     * @apiName (generate)update selected data
     * @apiGroup WR_PDO_B-入河排污口基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         pdoCd              入河排污口代码
     * @apiParam   {String}         pdoNm              入河排污口名称
     * @apiParam   {String}         addr               地址
     * @apiParam   {String}         pdoTp              入河排污口性质
     * @apiParam   {Date}           compDt             建成日期
     * @apiParam   {String}         emisTp             排放方式
     * @apiParam   {String}         inRvTp             入河方式
     * @apiParam   {Double}         desPollCap         设计日排污能力
     * @apiParam   {String}         runCond            运行状况
     * @apiParam   {Date}           ts                 时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         powTp              污水分类
     * @apiParam   {String}         emisCyc            间歇或季节性排放周期
     * @apiParam   {Integer}        cycDnum            周期内排放次数
     * @apiParam   {String}         pdoSca             入河排污口规模
     * @apiParam   {String}         perStu             许可状态
     * @apiParam   {String}         morChe             监督性监测状态
     * @apiParam   {Integer}        pdoSize            排污口截面积
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest wr/pdo/b/420581000023/update-selective
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "pdoCd": "420581000023",
     * "pdoNm": "红花套镇青年闸排污口",
     * "addr": null,
     * "pdoTp": null,
     * "compDt": null,
     * "emisTp": "2",
     * "inRvTp": "4",
     * "desPollCap": null,
     * "runCond": null,
     * "ts": "2014-07-26 18:41:18.0",
     * "nt": null,
     * "powTp": null,
     * "emisCyc": null,
     * "cycDnum": null,
     * "pdoSca": null,
     * "perStu": null,
     * "morChe": null,
     * "pdoSize": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{pdoCd:\\w{12}}/update-selective")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateSelective(@PathParam("pdoCd") String pdoCd, WrPdoB record) {
        record.setPdoCd(pdoCd);
        LOGGER.info("根据主键修改(只修改非null字段) 入河排污口基本信息表,参数 WrPdoB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wrPdoBService.updateByPrimaryKeySelective(record)))).build();
    }

    /**
     * @api {post} wr/pdo/b/updateBatch [U][G]根据主键批量修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据批量主键修改WR_PDO_B(入河排污口基本信息表)数据,只修改非null字段
     * @apiName (generate)updateBatch selected data
     * @apiGroup WR_PDO_B-入河排污口基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         pdoCd              入河排污口代码
     * @apiParam   {String}         pdoNm              入河排污口名称
     * @apiParam   {String}         addr               地址
     * @apiParam   {String}         pdoTp              入河排污口性质
     * @apiParam   {Date}           compDt             建成日期
     * @apiParam   {String}         emisTp             排放方式
     * @apiParam   {String}         inRvTp             入河方式
     * @apiParam   {Double}         desPollCap         设计日排污能力
     * @apiParam   {String}         runCond            运行状况
     * @apiParam   {Date}           ts                 时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         powTp              污水分类
     * @apiParam   {String}         emisCyc            间歇或季节性排放周期
     * @apiParam   {Integer}        cycDnum            周期内排放次数
     * @apiParam   {String}         pdoSca             入河排污口规模
     * @apiParam   {String}         perStu             许可状态
     * @apiParam   {String}         morChe             监督性监测状态
     * @apiParam   {Integer}        pdoSize            排污口截面积
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest  wr/pdo/b/updateBatch
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "pdoCd": "420581000023",
     * "pdoNm": "红花套镇青年闸排污口",
     * "addr": null,
     * "pdoTp": null,
     * "compDt": null,
     * "emisTp": "2",
     * "inRvTp": "4",
     * "desPollCap": null,
     * "runCond": null,
     * "ts": "2014-07-26 18:41:18.0",
     * "nt": null,
     * "powTp": null,
     * "emisCyc": null,
     * "cycDnum": null,
     * "pdoSca": null,
     * "perStu": null,
     * "morChe": null,
     * "pdoSize": null
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("updateBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateBatch(List<WrPdoB> record) {
        LOGGER.info("根据主键批量修改(只修改非null字段) 入河排污口基本信息表,参数 WrPdoB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wrPdoBService.updateBatch(record)))).build();
    }

    /**
     * @api {delete} wr/pdo/b/{pdoCd:\\w{12}} [D][G]根据主键删除
     * @apiPrivate
     * @apiDescription [G]根据主键删除WR_PDO_B(入河排污口基本信息表)数据
     * @apiName (generate)delete by primary key
     * @apiGroup WR_PDO_B-入河排污口基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest wr/pdo/b/420581000023
     * @apiParam   {String}         pdoCd              【必须】入河排污口代码
     * @apiSuccess {Integer}        status             1:删除成功;0:要删除的数据不存在(可能已被删除).
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("{pdoCd:\\w{12}}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response delete(@PathParam("pdoCd") String pdoCd) {
        LOGGER.info("根据主键删除 入河排污口基本信息表,参数 pdoCd:{}", pdoCd);
        Integer rows = wrPdoBService.deleteByPrimaryKey(pdoCd);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }

    /**
     * @api {delete} wr/pdo/b/by-filter [D][G]根据条件删除
     * @apiPrivate
     * @apiDescription [G]根据条件删除WR_PDO_B(入河排污口基本信息表)数据
     * @apiName (generate)delete by filter
     * @apiGroup WR_PDO_B-入河排污口基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest wr/pdo/b/by-filter
     * @apiParam   {List(String)}   pdoCdList          (数组)入河排污口代码
     * @apiParam   {String}         pdoCd              入河排污口代码
     * @apiParam   {String}         pdoNm              入河排污口名称
     * @apiParam   {String}         addr               地址
     * @apiParam   {List(String)}   pdoTpList          (数组)入河排污口性质
     * @apiParam   {Date}           compDtBgTm         (开始时间)建成日期
     * @apiParam   {Date}           compDtEdTm         (结束时间)建成日期
     * @apiParam   {List(String)}   emisTpList         (数组)排放方式
     * @apiParam   {List(String)}   inRvTpList         (数组)入河方式
     * @apiParam   {Double}         desPollCapMin      (最小)设计日排污能力
     * @apiParam   {Double}         desPollCapMax      (最大)设计日排污能力
     * @apiParam   {List(String)}   runCondList        (数组)运行状况
     * @apiParam   {Date}           tsBgTm             (开始时间)时间戳
     * @apiParam   {Date}           tsEdTm             (结束时间)时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {List(String)}   powTpList          (数组)污水分类
     * @apiParam   {List(String)}   emisCycList        (数组)间歇或季节性排放周期
     * @apiParam   {List(Integer)}  cycDnumList        (数组)周期内排放次数
     * @apiParam   {List(String)}   pdoScaList         (数组)入河排污口规模
     * @apiParam   {List(String)}   perStuList         (数组)许可状态
     * @apiParam   {List(String)}   morCheList         (数组)监督性监测状态
     * @apiParam   {Integer}        pdoSizeMin         (最小)排污口截面积
     * @apiParam   {Integer}        pdoSizeMax         (最大)排污口截面积
     * @apiSuccess {Integer}        status             通常1或者>1:删除成功;0:没有符合条件的数据.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("by-filter")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response deleteByFilter(WrPdoBQo filter) {
        LOGGER.info("根据条件删除 入河排污口基本信息表,参数 WrPdoBQo:{}", filter);
        Integer rows = wrPdoBService.deleteByFilter(filter);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }
}
